package com.commonClass.RandomClass;

import java.util.Random;

public class TestRandom {
    public static void main(String[] args) {
        //实例化
        Random random = new Random();

        //通过nextInt 获取1-1000的随机整数
        int i = random.nextInt(1001);
        System.out.println(i);



    }
}

    